package com.rt.cms.common.enums;

/**
 * Create with IDEA
 *
 * @author Wangzs
 * @Description
 * @Date 2018/6/15
 * @Time 17:06
 */
public enum BusinessType {

    SUPPLY(1,  "供应链融资"),
    COMPANY(2, "企业经营贷"),
    PERSON(3,  "个人借款");

    private int    num;
    private String name;

    private BusinessType(int num, String name) {
        this.num = num;
        this.name = name;
    }
    public static String getByNum(int num) {
        for (BusinessType businessType : BusinessType.values()) {
            if (businessType.getNum() == num) {
                return businessType.name;
            }
        }
        return null;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
